package com.xinhe.web.reposity;

import com.xinhe.web.entity.MemberCoupon;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface MemberCouponRepository  extends JpaRepository<MemberCoupon, Long> {
    @Query(value = "select * from tb_member_coupon where removed = 0 and status = 'NOT_USE' and now() >= expire_time", nativeQuery = true)
    List<MemberCoupon> findExpire();
}
